<?php echo $this->tinyMce; ?>
<?php echo form_open_multipart('banner/edit',array('class'=>'form-horizontal form-validate','id'=>'frm'));?>
<fieldset>
    <legend><h4><?php echo $title;?></h4></legend>
    <table class="table-form-submit">
        <tr>
            <td><label for="title">Title *</label></td>
            <td><input type="text" value="<?php echo $banner['title']; ?>" required="" name="title" placeholder="title" class="form-control" /></td>
        </tr>
        <tr>
            <td><label for="path">File</label></td>
            <td><input type="file" name="path" class="" /></td>
        </tr>
        <tr>
            <td><label for="description">Description</label></td>
            <td>
                <textarea id="description" name="description" class="form-control"  rows="5" cols="80" style="width: 80%"><?php echo $banner['description']; ?></textarea>
            </td>
        </tr>
        <tr>
            <td><label for="pages[]">Select Page</label></td>
            <td>
            <?php echo form_dropdown('pages[]', $pageList, $pageBannerList, 'class="chosen-select" data-placeholder="Choose pages..." multiple style="width:400px;" tabindex="4"'); ?>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <label class="checkbox">
            <?php
            if($banner['activate'] == 1)
            {
                echo '<input name="activate" type="checkbox" checked="checked" /> Active';    
            }
            else
            {
                echo '<input name="activate" type="checkbox" /> Active';
            }
            ?>
                </label>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <?php echo form_hidden('banner_id',$banner['banner_id']); ?>
                <?php echo $form; ?>
            </td>
        </tr>
    </table>
 </fieldset> 
<script src="<?php echo base_url();?>media/chosen/chosen.jquery.js" type="text/javascript"></script>
<script src="<?php echo base_url();?>media/chosen/docsupport/prism.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    var config = {
      '.chosen-select'           : {},
      '.chosen-select-deselect'  : {allow_single_deselect:true},
      '.chosen-select-no-single' : {disable_search_threshold:10},
      '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
      '.chosen-select-width'     : {width:"95%"}
    }
    for (var selector in config) {
      $(selector).chosen(config[selector]);
    }
</script>
<?php echo form_close();?>